package com.itheima.Test;

public class MyThread extends Thread {
    //public static int a = 0;
    public static volatile int a = 0;

    @Override
    public void run() {
        //让程序睡两秒钟;
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {


        }
        a = 1;
        System.out.println("a的值已经修改成1");
    }
}
